package org.jsola.contract.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.contract.query.ContractQuery;
import org.jsola.contract.vo.*;
import org.jsola.core.Page;
import org.jsola.core.Result;

import java.util.List;

/**
 *
 * 企业总览
 *
 * @author huangrun
 */
@Api(tags = "contract-企业总览")
public interface IContractOverviewControllerAPI {

    /**
     * 本周的合同签署统计
     * @param contractQuery 参数
     * @return list
     */
    @ApiOperation(value = "本周的合同签署统计")
    Result<List<ContractOfSignForListVO>> selectContractCountWeek(ContractQuery contractQuery);

    /**
     * 当月的合同签署统计
     * @param contractQuery 参数
     * @return list
     */
    @ApiOperation(value = "当月的合同签署统计")
    Result<List<ContractOfSignForListVO>> selectContractCountMonth(ContractQuery contractQuery);

    /**
     * 本年的合同签署统计
     * @param contractQuery 参数
     * @return list
     */
    @ApiOperation(value = "本年的合同签署统计")
    Result<List<ContractOfSignForListVO>> selectContractCountYear(ContractQuery contractQuery);

    /**
     * 自定义时间的合同签署统计
     * @param contractQuery 参数
     * @return list
     */
    @ApiOperation(value = "自定义时间的合同签署统计")
    Result<List<ContractOfSignForListVO>> selectContractCountFree(ContractQuery contractQuery);


    /**
     * 合同概况数量统计
     * @return ContractCountVO
     */
    @ApiOperation(value="合同概况数量统计")
    Result<ContractCountVO> getContractCount();

    /**
     * 当月的合同签署统计
     * @return list
     */
    @ApiOperation(value = "当月的合同签署统计")
    public Result<List<ContractOfSignForListVO>> selectMonthForList();

    /**
     * 本周的合同签署统计
     * @return list
     */
    @ApiOperation(value = "本周的合同签署统计")
    public Result<List<ContractOfSignForListVO>> selectWeekForListCount();

    /**
     * 本年的合同签署统计
     * @return list
     */
    @ApiOperation(value = "本年的合同签署统计")
    public Result<List<ContractOfSignForListVO>> selectYearForListCount();

    /**
     * 时间段内合同签署统计
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return list
     */
    @ApiOperation(value = "时间段内合同签署统计")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "startTime", dataType = "string", value = "起始时间，2020-10", paramType = "query"),
            @ApiImplicitParam(name = "endTime", dataType = "string", value = "结束时间，2020-12", paramType = "query")
    })
    public Result<List<ContractOfSignForListVO>> getTwoTimePeriodsForCount(String startTime, String endTime);

    /**
     * 分页查询合同
     * @param contractQuery 合同查询参数
     * @return page
     */
    @ApiOperation(value="分页查询合同")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractQuery", dataType = "ContractQuery", value = "合同查询参数", paramType = "query")
    })
    Result<Page<ContractListVO>> page(ContractQuery contractQuery);

    /**
     * 分页查询用工单位排名
     * @param contractQuery 查询参数
     * @return page
     */
    @ApiOperation(value="分页查询用工单位排名")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractQuery", dataType = "ContractQuery", value = "合同查询参数", paramType = "query")
    })
    Result<Page<ContractStatisticsEmpUnitsVO>> selectComCountPage(ContractQuery contractQuery);
}